package com.dzl.exchange.service;

import com.dzl.base.service.BaseService;
import com.dzl.exchange.pojo.WelfareExchangeSecret;
import com.dzl.exchange.pojo.dto.ExchangeSecretDto;
import com.dzl.exchange.pojo.query.ExchangeSecretQuery;
import com.dzl.exchange.pojo.vo.ExchangeSecretVo;
import com.dzl.exchange.pojo.vo.ExchangeUserSecretVo;
import com.dzl.exchange.pojo.vo.WelfareExchangeWithSecretVo;
import com.dzl.fee.pojo.WelfareFeeUserCustomers;
import com.dzl.fee.pojo.WelfareFeeUserSales;
import com.dzl.fee.pojo.query.WelfareSalesCustomersQuery;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * 兑换券信息表(WelfareExchangeSecretDetails)表服务接口
 * @author caobucao
 * @date 2021-07-09 18:29:18
 */
public interface WelfareExchangeSecretService extends BaseService<WelfareExchangeSecret> {

    /**
     * 分页查询兑换券密表
     * @date 2021/7/9 19:09
     * @author caobucao
     * @param query 查询条件
     * @return java.util.List<com.dzl.exchangesecretdetails.pojo.vo.ExchangeSecretVo>
     */
    PageInfo<ExchangeSecretVo> queryExchangeSecretPage(ExchangeSecretQuery query);

    /**
     * 批量激活、冻结、解冻兑换券
     * @date 2021/7/10 9:40
     * @author caobucao
     * @param dto  传入参数
     * @return java.lang.Integer
     */
    Integer updateBatchExchangeSecretByIds(ExchangeSecretDto dto);

    /**
     * 获取兑换券信息
     * @author ChenLong
     * @date 2021-07-10 19:26:05
     * @param exchangeSecretId
     * @return java.util.List
     **/
    WelfareExchangeWithSecretVo getExchangeInfoByExchangeSecretId(Integer exchangeSecretId);

    /**
     * 获取用户绑定的兑换券列表
     *
     * @author ChenLong
     * @date 2021-07-10 14:20:15
     * @param userId 用户ID
     * @return java.util.List
     **/
    List<WelfareExchangeWithSecretVo> getUserExchangeBindList(Integer userId);

    /**
     * 通过用户ID查询用户兑换券的详细信息
     * @date 2021/7/12 11:13
     * @author caobucao
     * @param id 用户id
     * @return java.util.List<com.dzl.exchange.pojo.vo.ExchangeUserSecretVo>
     */
    List<ExchangeUserSecretVo> selectUserExchangeSecretVoListByUserId(Integer id);

    /**
     * 通过券号或券密查询兑换券详细信息
     * @date 2021/7/31 11:55
     * @author caobucao
     * @param number 券号
     * @param secret 券密
     * @return com.dzl.exchangesecret.pojo.vo.ExchangeSecretVo
     */
    ExchangeSecretVo queryExchangeSecretByNumberOrSecret(String number, String secret);

    /**
     * 确认兑换券
     * @param userId 用户id
     * @param exchangeSecretId 券密id
     * @author liuguanjun
     * @date 2021/12/06 10:01
     */
    String confirmExchangeSecret(Integer userId, Integer exchangeSecretId);

    /**
     * 查询当前年份的券密总数
     * @date 2021/7/30 16:29
     * @author caobucao
     * @param s K+年份后两位
     * @return java.lang.Integer
     */
    Integer selectCountYearExchange(String s);

    /**
     * 查询该券密组下面的业务员
     * @date 2021/9/18 10:48
     * @author caobucao
     * @param query 查询条件
     * @return java.util.List<com.dzl.fee.pojo.WelfareFeeUserSales>
     */
    List<WelfareFeeUserSales> selectSalesByExchangeId(WelfareSalesCustomersQuery query);

    /**
     * 查询该券密组下面的客户
     * @date 2021/9/18 10:52
     * @author caobucao
     * @param query 查询条件
     * @return java.util.List<com.dzl.fee.pojo.WelfareFeeUserCustomers>
     */
    List<WelfareFeeUserCustomers> selectCustomersByExchangeId(WelfareSalesCustomersQuery query);

}
